package com.gwtjs.hbm2xml.spring;

import java.util.ArrayList;
import java.util.List;

public class TXMethod {
	private static TXMethod method = new TXMethod();

	private TXMethod() {
	}

	public static TXMethod getInstance() {
		return method;
	}

	public List<TXMethod> getMethod() {
		List<TXMethod> txs = new ArrayList<TXMethod>();
		TXMethod tx = new TXMethod();
		tx.setName("save*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(false);
		txs.add(tx);

		tx = new TXMethod();
		tx.setName("add*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(false);

		tx = new TXMethod();
		tx.setName("create*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(false);
		txs.add(tx);

		tx = new TXMethod();
		tx.setName("insert*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(false);
		txs.add(tx);

		tx = new TXMethod();
		tx.setName("update*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(false);
		txs.add(tx);

		tx = new TXMethod();
		tx.setName("merge*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(false);
		txs.add(tx);

		tx = new TXMethod();
		tx.setName("del*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(false);
		txs.add(tx);

		tx = new TXMethod();
		tx.setName("remove*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(false);
		txs.add(tx);

		tx = new TXMethod();
		tx.setName("put*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(false);
		txs.add(tx);

		tx = new TXMethod();
		tx.setName("use*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(false);
		txs.add(tx);

		tx = new TXMethod();
		tx.setName("get*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(true);
		txs.add(tx);

		tx = new TXMethod();
		tx.setName("count*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(true);
		txs.add(tx);

		tx = new TXMethod();
		tx.setName("find*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(true);
		txs.add(tx);

		tx = new TXMethod();
		tx.setName("list*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(true);
		txs.add(tx);
		
		tx = new TXMethod();
		tx.setName("*");
		tx.setPropagation("REQUIRED");
		tx.setFlag(true);
		txs.add(tx);

		return txs;
	}

	private String name;
	private String propagation;
	private boolean flag = false;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPropagation() {
		return propagation;
	}

	public void setPropagation(String propagation) {
		this.propagation = propagation;
	}

	public boolean isFlag() {
		return flag;
	}

	public void setFlag(boolean flag) {
		this.flag = flag;
	}

}
